<template>
	<view class="flex-col page">
		<view class="flex-col flex-auto group space-y-758">
			<view class="flex-col">
				<view class="flex-row justify-between items-center section_3" @click="toHelp">
					<text class="font_2">帮助文档</text>
					<image class="image_6" src="/static/more1.png" />
				</view>
				<view class="flex-row justify-between items-center section_3" @click="toAbout">
					<text class="font_2">关于我们</text>
					<image class="image_6" src="/static/more1.png" />
				</view>
				<view class="flex-row justify-between items-center section_3" @click="toYinsi(1)">
					<text class="font_2">用户协议</text>
					<image class="image_6" src="/static/more1.png" />
				</view>
				<view class="flex-row justify-between items-center section_3" @click="toYinsi(2)">
					<text class="font_2">隐私政策</text>
					<image class="image_6" src="/static/more1.png" />
				</view>
				<view class="flex-row justify-between items-center section_3" @click="toFeedback">
					<text class="font_2">意见反馈</text>
					<image class="image_6" src="/static/more1.png" />
				</view>
			</view>
			<view class="flex-col justify-start items-center self-center button" @click="toNotSign" v-if="member!=''"><text class="text_4">退出登录</text></view>
		</view>
	</view>
</template>

<script setup>
	import {
		onShow
	} from "@dcloudio/uni-app";
	import {
		onMounted,
		ref,
		reactive
	} from "vue"
	let member = ref('')
	
	onShow(() => {
		if( uni.getStorageSync('member_id')){
			member.value= uni.getStorageSync('member_id')
			// getDate()
		}else{
			member.value=''
		}
		
	})
	const toNotSign=()=>{
		uni.removeStorageSync('member_id')
		uni.showToast({
			title:'退出成功！',
			icon:'none'
		})
		setTimeout(()=>{
			uni.navigateBack()
		},1500)
		uni.removeStorageSync('invite_id')
	}
	const toLogin = () => {
		uni.navigateTo({
			url:'/pages/login/login'
		})
	}
	
	const toDetail = () => {
		uni.navigateTo({
			url:'/pages/mineDetail/mineDetail'
		})
	}
	const toCollect = () => {
		uni.navigateTo({
			url:'/pages/collect/collect'
		})
	}
	
	const toHelp = () => {
		uni.navigateTo({
			url:'/pages/help/help'
		})
	}
	const toAbout = () => {
		uni.navigateTo({
			url:'/pages/aboutUs/aboutUs'
		})
	}
	const toYinsi = (num) => {
		uni.navigateTo({
			url:'/pages/yonghuxieyi/yonghuxieyi?type='+num
		})
	}
	const toFeedback = () => {
		uni.navigateTo({
			url:'/pages/feedback/feedback'
		})
	}
</script>

<style scoped lang="scss">
	.page {
		background-color: #f8f8f8;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		height: 100vh;

		.group {
			padding-bottom: 56rpx;
			overflow-y: auto;

			.section_3 {
				padding: 38rpx 30rpx;
				background-color: #ffffff;

				.font_2 {
					font-size: 28rpx;
					font-family: PingFang SC;
					line-height: 27rpx;
					font-weight: 500;
					color: #333333;
				}

				.image_6 {
					width: 9rpx;
					height: 18rpx;
				}
			}

			.button {
				padding: 36rpx 0;
				background-color: #FF3333;
				border-radius: 50rpx;
				width: 630rpx;
				position: fixed;
				bottom: 40rpx;

				.text_4 {
					color: #ffffff;
					font-size: 32rpx;
					font-family: PingFang SC;
					font-weight: 500;
					line-height: 31rpx;
				}
			}
		}

		.space-y-758 {

			&>view:not(:first-child),
			&>text:not(:first-child),
			&>image:not(:first-child) {
				margin-top: 758rpx;
			}
		}
	}
</style>